from app.extensions import db
import datetime

from pygments.lexer import default


class Task(db.Model):
    __tablename__ = 't_qp_task'
    id = db.Column(db.String(60), primary_key=True)
    qprq = db.Column(db.DateTime, default=datetime.datetime.now)
    qpcs = db.Column(db.Text, default="")

    def __init__(self, data):
        self.qprq = data['qprq']
        self.qpcs = data['qpcs']
        self.id = data['id']

